class Student(object):

    def __init__(self, name, score):
        self.name = name
        self.__score = score

    def get_score(self):
        return self.__score

    def set_score(self, score):
        if isinstance(score, int) and 0 < score < 100:
            self.__score = score
        else:
            raise ValueError("数据错误")

# alvin = Student("alvin",66)
yuan = Student("yuan",88)
# print(yuan.__score)
print(yuan.get_score())
yuan.set_score(1000)
print(yuan.get_score())
# alvin.score=100
# print(alvin.score)